#!/usr/bin/env bash

sandbox_module_path="/Users/liucan/workspace/yzw/sandbox/sandbox/sandbox-module/"

mvn clean package

if [[ -z $sandbox_module_path ]];
then
    sandbox_module_path="~/sandbox/sandbox-module/"
    echo "sandbox_module_path is empty, use default path: ${sandbox_module_path}"
    cp ./target/sandbox-module-custom-*-jar-with-dependencies.jar ~/sandbox/sandbox-module/
else
    echo "sandbox_module_path is not empty."
    cp ./target/spring-initialize-bean-1.4.0-jar-with-dependencies.jar ${sandbox_module_path}
fi

echo "package finish. use path: ${sandbox_module_path}"